package com.hu.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hu.common.annotation.Excel;
import com.hu.common.core.domain.BaseEntity;

/**
 * 库存记录对象（统一入库和出库视图）
 *
 * @author hu
 * @date 2025-01-22
 */
public class StockRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    private Long recordId;

    /**
     * 记录类型（INBOUND:入库 OUTBOUND:出库 LOSS:损耗）
     */
    @Excel(name = "记录类型")
    private String recordType;

    /**
     * 入库类型（仅当recordType=INBOUND时有值：PURCHASE:采购入库 RETURN:退货入库）
     */
    @Excel(name = "入库类型")
    private String inboundType;

    /**
     * SKU编码
     */
    @Excel(name = "SKU编码")
    private String sku;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String productName;

    /**
     * 所属店铺ID
     */
    private Long shopId;

    /**
     * 所属店铺名称
     */
    @Excel(name = "所属店铺")
    private String shopName;

    /**
     * 数量（后端返回正数，前端根据recordType显示正负）
     */
    @Excel(name = "数量")
    private Integer quantity;

    /**
     * 记录日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date recordDate;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    // Getters and Setters
    public Long getRecordId() {
        return recordId;
    }

    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }

    public String getRecordType() {
        return recordType;
    }

    public void setRecordType(String recordType) {
        this.recordType = recordType;
    }

    public String getInboundType() {
        return inboundType;
    }

    public void setInboundType(String inboundType) {
        this.inboundType = inboundType;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Date getRecordDate() {
        return recordDate;
    }

    public void setRecordDate(Date recordDate) {
        this.recordDate = recordDate;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

